package icraf.carbon.gui.chart;

import icraf.carbon.core.AbacusData;

import java.awt.geom.Rectangle2D;

public class AbacusBar extends Rectangle2D.Double {
		private static final long serialVersionUID = 1412791406104960860L;
		private ShapeFormat shapeFormat = new ShapeFormat();
		AbacusData data;
		AbacusLabel label;
		private String text;
		private boolean visible = true;
		private double emissionBase;

		public double getEmissionBase() {
			return emissionBase;
		}

		public void setEmissionBase(double emissionBase) {
			this.emissionBase = emissionBase;
		}

		public boolean isVisible() {
			return visible;
		}

		public void setVisible(boolean visible) {
			this.visible = visible;
			if(label != null)
			label.setVisible(visible);
		}

		public AbacusBar(ShapeFormat format) {
			super();
			this.shapeFormat = format;
		}

		public AbacusBar() {
		}

		public ShapeFormat getShapeFormat() {
			return shapeFormat;
		}

		public AbacusData getData() {
			return data;
		}

		public AbacusLabel getLabel() {
			return label;
		}

		public String getText() {
			return text;
		}

		public void setShapeSetting(ShapeFormat format) {
			shapeFormat = format;
		}

		public void setData(AbacusData data) {
			this.data = data;
		}

		public void setLabel(AbacusLabel label) {
			this.label = label;
		}

		public void setToolTipText(String string) {
			text = string;
		}
	}